import request from '@/utils/request.js'


export function getList(data) {
    return request({
        url: `/mes/bpm/getformlist`,
        method: 'post',
        data
    })
}

export function getItem(id) {
    return request({
        url: `/mes/bpm/getformbyid`,
        method: 'get',
        params: {
            id
        }
    })
}

export function update(data) {
    return request({
        url: `/mes/bpm/updateform`,
        method: 'post',
        data
    })
}

export function add(data) {
    return request({
        url: `/mes/bpm/addform`,
        method: 'post',
        data
    })
}


export function del(id) {
    return request({
        url: `/mes/bpm/delformbyid`,
        method: 'get',
        params:{id}
    })
}



export function getJsonbyBnpmId(data) {
    return request({
        url: '/mes/bpm/getpipelineandlinelist' ,
        method: 'get',
        params: {
            ...data,
            bpmId: data.bpmId
        }
    })
}
